import instance from '@/utils/request.js';


export const getPostList = (params) => {
  return instance({
    url: '/post/list',
    method: 'get',
    params,
  })
};
export const addPost = (data) => {
  return instance({
    url: '/post',
    method: 'post',
    data,
  })
};

export const getPostDetail = (id) => {
  return instance({
    url: `/post/${id}`,
    method: 'get',
  })
};
